/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.googlecode.jsimplemarket.model;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Alexandru.Codescu
 */
@Entity
@Table(name = "alarme_active")
public class AlarmaActiva extends AbstractEntitate {
    private Date dataDeclansare;
    private NTipAlarma tipAlarma;
    private String mesaj;

    @Column(name = "DATA_DECLANSARE")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getDataDeclansare() {
        return dataDeclansare;
    }
    
    public void setDataDeclansare(Date dataDeclansare) {
        this.dataDeclansare = dataDeclansare;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "ID_TIP_ALARMA")
    public NTipAlarma getTipAlarma() {
        return tipAlarma;
    }

    public void setTipAlarma(NTipAlarma tipAlarma) {
        this.tipAlarma = tipAlarma;
    }

    @Column(name = "MESAJ", length = 500)
    public String getMesaj() {
        return mesaj;
    }

    public void setMesaj(String mesaj) {
        this.mesaj = mesaj;
    }
}
